#include <vcl.h>

class Warrior
{
   private:
      AnsiString name;

      //atributos
      int hp;
      int atq;
      int def;
      int aci;
      int esq;
      int reg;
      int vel;
      int mag;

      int contadorDefensa;
   public:
      // Constructores Impontentes
      Warrior() :
         name("default"),hp(100), atq (10), def(5), aci(90), esq(10), reg(10), vel(10), mag(10), contadorDefensa(0) {}
      Warrior(AnsiString c_name,int c_hp,int c_atq,int c_def,int c_aci,int c_esq,int c_reg,int c_vel,int c_mag) :
         name(c_name),hp(c_hp), atq(c_atq), def(c_def),aci(c_aci), esq(c_esq), reg(c_reg), vel(c_vel),mag(c_mag),contadorDefensa(0) {}

      void SetAtributos(AnsiString c_name,int c_hp,int c_atq,int c_def,int c_aci,int c_esq,int c_reg,int c_vel,int c_mag);

      void SetName(AnsiString nombre) {name = nombre;}
      void ChangeHP () {hp+=reg;}
      void ChangeHP (int cant) {hp+=cant;}
      void SetHP (int cant) {hp=cant;}
      void SetAtq (int cant) {atq=cant;}
      void SetDef (int cant) {def=cant;}
      void SetAci (int cant) {aci=cant;}
      void SetEsq (int cant) {esq=cant;}
      void SetReg (int cant) {reg=cant;}
      void SetVel (int cant) {vel=cant;}
      void SetMag (int cant) {mag=cant;}

      AnsiString GetName(){return name;}
      int GetHP(){return hp;}
      int GetAtq(){return atq;}
      int GetDef(){return def;}
      int GetAci(){return aci;}
      int GetEsq(){return esq;}
      int GetReg(){return reg;}
      int GetVel(){return vel;}
      int GetMag(){return mag;}

      int GetContadorDefensa(){return contadorDefensa;}

      int Atacar(Warrior &defender);
      int Herir(bool tipodam,Warrior &defender);
      int SacrificioAtq(Warrior &defender);
      int SacrificioHerir(bool tipodam,Warrior &defender);
      void Magia(Warrior &enemigo, int **efects);
      void Efecto(Warrior &objetivo,int** efects,int vez);
      void Efecto(int** efects,int vez);
      void Defender();

      void comprobarDefensa();
};
